package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

class Solution1306 {
    public boolean canReach(int[] arr, int start) {
        return GraphUtils.canReach(arr, start);
    }
}

public class leetcode1306 {
    public static void main(String[] args) {
        Solution1306 solution1306 = new Solution1306();

        int[] arr = {4, 2, 3, 0, 3, 1, 2};
        int start = 5;
        System.out.println(solution1306.canReach(arr, start));

        int[] arr1 = {4, 2, 3, 0, 3, 1, 2};
        int start1 = 0;
        System.out.println(solution1306.canReach(arr1, start1));

        int[] arr2 = {3, 0, 2, 1, 2};
        int start2 = 2;
        System.out.println(solution1306.canReach(arr2, start2));
    }
}
